<div class="box-body">
    <form class="layui-form" action="{:url('/wms/wstock/save')}" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label xrequired">预警库存</label>
            <div class="layui-input-block">
                <input type="number" autocomplete="off" placeholder="最小库存"  name="min_stock" {if isset($stock)}value="{$stock.min_stock}"{/if}  class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label xrequired">上限库存</label>
            <div class="layui-input-block">
                <input type="number" autocomplete="off" placeholder="最大库存"  name="max_stock" {if isset($stock)}value="{$stock.max_stock}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">库位</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" placeholder="库位"  name="code" {if isset($stock)}value="{$stock.location?$stock.location.code:''}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" placeholder="备注"  name="remark" {if isset($stock)}value="{$stock.remark}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <input type="checkbox" name="status" value="1" {if isset($stock) && $stock.status=='1'}checked{/if} lay-skin="switch">
            </div>
        </div>
        <input type="hidden" name="stock_id" value="{$stock.stock_id}">
    </form>
</div>